
        const mysql = require('mysql')
        // 1. 创建连接池
        const db = mysql.createPool({
            host: '127.0.0.1',
            port: 3306,
            user: 'root',
            password: 'root',
            database: 'test'
        })
        let arr1 = [
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E9%9D%A2%E8%86%9C%E8%B4%B4&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "面膜贴"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E6%B4%97%E9%9D%A2%E5%A5%B6&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "洗面奶"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E5%94%87%E8%86%8F&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "唇膏"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E5%8E%BB%E9%BB%91%E5%A4%B4&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "去黑头"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E7%A5%9B%E6%96%91&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "祛斑"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E9%9A%94%E7%A6%BB&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "隔离"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E7%A5%9B%E7%97%98&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "祛痘"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E5%8E%BB%E8%A7%92%E8%B4%A8&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "去角质"
            },
            {
                href: "http://search.jumei.com/?filter=0-11-1&amp;search=%E6%8C%87%E7%94%B2%E6%B2%B9&from=all_null_index_top_nav_cosmetics&lo=3481&mat=30573",
                target: "指甲油"
            },
        
                                      
        ]
        const list = []
        arr1.forEach(e => {
            const obj = {
              
            }

            const sql = 'INSERT INTO `ju_table` VALUES(null, ?, ?,?)'
            const info = [`热门搜索`, e.href ,e.target]
            db.query(sql, info, (err, data) => {
                if (err) return console.log(err)
            })

        })
    
       

